package com.component.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.component.domain.MLog;
import com.component.service.MLogService;
import com.component.mapper.MLogMapper;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class MLogServiceImpl extends ServiceImpl<MLogMapper, MLog>
    implements MLogService{

    @Override
    public IPage<MLog> page(Integer pageNum, Integer pageSize,String uid) {
        LambdaQueryWrapper<MLog> lambdaQueryWrapper=new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(MLog::getUid,uid);
        lambdaQueryWrapper.orderByDesc(MLog::getCreatedate);
        IPage<MLog> mLogIPage=this.baseMapper.selectPage(new Page(pageNum,pageSize),lambdaQueryWrapper);
        return mLogIPage;
    }
}




